<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:fn="http://java.sun.com/jsp/jstl/functions"
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     class="menu-wrapper">

    <h:panelGroup render="#{moduleView.currentModule != null}">
        <ul>
            <ui:repeat value="#{moduleView.pageList}" var="modulePage" varStatus="modulePageindex">
                <ui:param name="cssClass"
                          value="#{fn:contains(request.servletPath, modulePage.path) ? 'page-menu-active' :''}"/>

                <li title="#{modulePage.name}" class="#{cssClass}">
                    <h:panelGroup layout="block" rendered="#{cssClass != ''}">
                        <div>
                            <span class="tab">
                                <span>#{modulePage.name}</span>
                            </span>
                        </div>
                    </h:panelGroup>
                    <h:link title="#{modulePage.name}"
                                   outcome="#{moduleView.currentModule.path}#{modulePage.path}"
                                   rendered="#{cssClass == ''}">
                                <span class="tab">
                                    <span>#{modulePage.name}</span>
                                </span>
                        <f:param name="code" value="#{moduleView.currentModule.code}"/>
                        <f:param name="tab" value="#{modulePage.code}"/>
                    </h:link>
                </li>
            </ui:repeat>
        </ul>
    </h:panelGroup>
    <h:panelGroup render="#{moduleView.currentModule == null or moduleView.pageList.empty}">

    </h:panelGroup>
</div>